package set;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class HashSetTest {
	public static void main(String[] args) {
		Set<String> set = new HashSet<String>();
		set.add("abcdess");
		set.add("abcsfa");
		set.add("abcgv");
		set.add("abcas");
		
		System.out.println(set);
		System.out.println(set.size());
		
		set.remove("abcde");
		
		System.out.println(set);

		System.out.println(set.contains("abcas"));
		
		set.removeIf((t) -> t.length()<6);
		System.out.println(set);
		
		Iterator<String> it = set.iterator();
		while(it.hasNext()){
			System.out.print(it.next()+" ");
		}
	}
}
